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

Disable XML transformation in CI/CD pipelines #295

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion Deployment/templates/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ jobs:
displayName: File transform - website config
inputs:
folderPath: "$(Pipeline.Workspace)/AngularApp/ukho-fileshareservice-ui"
xmlTransformationRules:
enableXmlTransform: false
xmlTransformationRules: ''
jsonTargetFiles: '**/appconfig.json'

- task: AzureCLI@2
Expand Down
3 changes: 2 additions & 1 deletion Deployment/templates/playwright-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ jobs:
displayName: AppSetting transform for ${{ parameters.TestDescription }} tests
inputs:
folderPath: '$(Build.SourcesDirectory)\'
xmlTransformationRules:
enableXmlTransform: false
xmlTransformationRules: ''
jsonTargetFiles: appSetting.json

- script: |
Expand Down
54 changes: 54 additions & 0 deletions NVDSuppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,58 @@
<packageUrl regex="true">^pkg:npm/webpack@.*$</packageUrl>
<cve>CVE-2024-43788</cve>
</suppress>
<suppress>
<notes>
<![CDATA[
file name: cross-spawn:7.0.3
]]>
</notes>
<packageUrl regex="true">^pkg:npm/cross-spawn@.*$</packageUrl>
<cve>CVE-2024-21538</cve>
</suppress>
<suppress>
<notes>
<![CDATA[
file name: http-proxy-middleware:2.0.6
]]>
</notes>
<packageUrl regex="true">^pkg:npm/http-proxy-middleware@.*$</packageUrl>
<cve>CVE-2024-21536</cve>
</suppress>
<suppress>
<notes>
<![CDATA[
file name: source-map-support:0.5.13
]]>
</notes>
<packageUrl regex="true">^pkg:npm/source-map-support@.*$</packageUrl>
<cve>CVE-2024-21540</cve>
</suppress>
<suppress>
<notes>
<![CDATA[
file name: source-map-support:0.5.21
]]>
</notes>
<packageUrl regex="true">^pkg:npm/source-map-support@.*$</packageUrl>
<cve>CVE-2024-21540</cve>
</suppress>
<suppress>
<notes>
<![CDATA[
file name: http-proxy-middleware:2.0.6
]]>
</notes>
<packageUrl regex="true">^pkg:npm/http-proxy-middleware@.*$</packageUrl>
<vulnerabilityName>GHSA-c7qv-q95q-8v27</vulnerabilityName>
</suppress>
<suppress>
<notes>
<![CDATA[
file name: cross-spawn:7.0.3
]]>
</notes>
<packageUrl regex="true">^pkg:npm/cross-spawn@.*$</packageUrl>
<vulnerabilityName>GHSA-3xgq-45jj-v275</vulnerabilityName>
</suppress>
</suppressions>
18 changes: 15 additions & 3 deletions src/app/features/exchange-set/ess-types/ess-types.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,27 @@ export class EssTypesComponent implements OnInit, OnDestroy {

private isValidDeltaDateSelected(selectedDate: any) {
const currentDate: any = new Date();
const targetDate: any = new Date(selectedDate);
const targetDate: any = new Date();

targetDate.setFullYear(selectedDate.getFullYear());
targetDate.setDate(selectedDate.getDate());
targetDate.setMonth(selectedDate.getMonth());
targetDate.setHours(currentDate.getHours());
targetDate.setMinutes(currentDate.getMinutes());
targetDate.setSeconds(currentDate.getSeconds());
targetDate.setMilliseconds(currentDate.getMilliseconds());

const differenceMs = Math.abs(targetDate - currentDate);

alert("Current Date: " + currentDate);
alert("Selected Date: " + targetDate);

alert("Timezone Offset: " + targetDate.getTimezoneOffset());

const differenceMs = Math.abs(targetDate - currentDate) + (targetDate.getTimezoneOffset() * 60000);
const differenceDays = Math.ceil(differenceMs / (1000 * 60 * 60 * 24));


alert("Days: " + differenceDays);

if (differenceDays > 27 || targetDate > currentDate) {
this.resetDate();
return false;
Expand Down
Loading