Skip to content

Commit

Permalink
Merge branch 'master' into WS-60-Update-Zgw-Rol-Check
Browse files Browse the repository at this point in the history
  • Loading branch information
MLenterman authored Jul 16, 2024
2 parents 6f00b5b + 179c468 commit 47f4496
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #4.1.7

- name: Download Docker tar
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e #4.1.7
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 #4.1.8
with:
name: build-docker-image

Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
fi
- name: Upload SoapUI testreports as artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b #4.3.4
if: always()
with:
name: reports-soapui-testreports
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #4.1.7

- name: "Setup Node"
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 #4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b #4.0.3
with:
node-version: 20

Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #4.1.7

- name: Download Docker tar
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e #4.1.7
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 #4.1.8
with:
name: build-docker-image

Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
fi
- name: Upload SoapUI testreports as artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b #4.3.4
if: always()
with:
name: reports-soapui-testreports
Expand All @@ -137,19 +137,19 @@ jobs:
token: ${{ secrets.WEAREFRANK_BOT_PAT }}

- name: Download Pre-build Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e #4.1.7
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 #4.1.8
with:
pattern: pre-build-*
merge-multiple: true

- name: Download Build Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e #4.1.7
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 #4.1.8
with:
pattern: build-*
merge-multiple: true

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 #4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b #4.0.3
with:
node-version: 20

Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
[![conventional commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org) [![semantic versioning](https://img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org)

## [1.19.15](https://github.com/wearefrank/zaakbrug/compare/v1.19.14...v1.19.15) (2024-07-10)

### 🐛 Bug Fixes

* return error closest to the source and return all nested errors ([#416](https://github.com/wearefrank/zaakbrug/issues/416)) ([c8c35a8](https://github.com/wearefrank/zaakbrug/commit/c8c35a807d31d241f3d745efe99c82a2eab25767))

### 🧑‍💻 Code Refactoring

* wrap zakla01 response xslt should not contain any zgw to zds translations ([#394](https://github.com/wearefrank/zaakbrug/issues/394)) ([e748a54](https://github.com/wearefrank/zaakbrug/commit/e748a548924f48da922389d1ec6c4a5adead1c84))

### 🤖 Build System

* **dependencies:** bump the github-actions group with 6 updates ([#411](https://github.com/wearefrank/zaakbrug/issues/411)) ([4909eb2](https://github.com/wearefrank/zaakbrug/commit/4909eb2808982cdda033e9bfd5e822794eec4559))
* **dependencies:** bump typescript ([#410](https://github.com/wearefrank/zaakbrug/issues/410)) ([74652fa](https://github.com/wearefrank/zaakbrug/commit/74652fa08d19594194052c5de73971fd89b63fbe))

## [1.19.14](https://github.com/wearefrank/zaakbrug/compare/v1.19.13...v1.19.14) (2024-07-03)

### 🐛 Bug Fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
<xsl:output method="text" version="1.0" encoding="UTF-8" omit-xml-declaration="yes"/>

<xsl:template match="/">
<xsl:apply-templates select="error" />
<xsl:apply-templates select="(//error)[last()]" />
</xsl:template>
<xsl:template match="error">
<xsl:choose>
<xsl:when test="code='TechnicalError'">500</xsl:when>
<xsl:when test="code='TranslationError'">400</xsl:when>
<xsl:when test="code='ConfigurationError'">500</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@

<xsl:template match="/">
<root>
<xsl:apply-templates select="//profile[zaakTypeIdentificatie = $zaaktype]" />
<!-- Check for profile with matching zaakTypeIdentificatie -->
<xsl:choose>
<xsl:when test="//profile[zaakTypeIdentificatie = $zaaktype]">
<xsl:apply-templates select="//profile[zaakTypeIdentificatie = $zaaktype]/valueOverrides" mode="copy"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="//profileDefaults/valueOverrides" mode="copy"/>
</xsl:otherwise>
</xsl:choose>
</root>
</xsl:template>

<xsl:template match="profile">
<xsl:copy-of select="valueOverrides" />
<xsl:template match="valueOverrides" mode="copy">
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,17 @@
<Forward name="success" path="WrapFo03Response"/>
</PutInSessionPipe>

<PutInSessionPipe name="BackEndError" unlessSessionKey="errorCode">
<Param name="errorCode" styleSheetName="Common/xsl/BackEndError.xsl"/>
<Param name="errorReason" xpathExpression="/error/reason"/>
<Param name="errorDetailText" xpathExpression="concat(/error/code, ' ', /error/reason, ' ', /error/details)"/>
<Param name="errorDetailXML" xpathExpression="/error/detailsXml" type="DOMDOC" />
<Forward name="success" path="WrapFo03Response"/>
<PutInSessionPipe
name="BackEndError"
unlessSessionKey="errorCode"
>
<Param name="errorCode" styleSheetName="Common/xsl/BackEndError.xsl" />
<Param name="errorReason" xpathExpression="(//error)[last()]/reason" />
<Param name="errorDetailText" xpathExpression="(//error)[last()]/details" />
<Param name="errorDetailXML" xpathExpression="/error" type="DOMDOC" />
<Forward name="success" path="WrapFo03Response" />
</PutInSessionPipe>

<SoapWrapperPipe
name="WrapFo03Response"
soapBodyStyleSheet="Common/xsl/CreateFo03Response.xslt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,15 @@
<Forward name="success" path="WrapFo03Response"/>
</PutInSessionPipe>

<PutInSessionPipe name="BackEndError" unlessSessionKey="errorCode">
<Param name="errorCode" styleSheetName="Common/xsl/BackEndError.xsl"/>
<Param name="errorReason" xpathExpression="/error/reason"/>
<Param name="errorDetailText" xpathExpression="concat(/error/code, ' ', /error/reason, ' ', /error/details)"/>
<Param name="errorDetailXML" xpathExpression="/error/detailsXml" type="DOMDOC" />
<Forward name="success" path="WrapFo03Response"/>
<PutInSessionPipe
name="BackEndError"
unlessSessionKey="errorCode"
>
<Param name="errorCode" styleSheetName="Common/xsl/BackEndError.xsl" />
<Param name="errorReason" xpathExpression="(//error)[last()]/reason" />
<Param name="errorDetailText" xpathExpression="(//error)[last()]/details" />
<Param name="errorDetailXML" xpathExpression="/error" type="DOMDOC" />
<Forward name="success" path="WrapFo03Response" />
</PutInSessionPipe>

<SoapWrapperPipe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,15 @@
<Forward name="success" path="WrapFo03Response"/>
</PutInSessionPipe>

<PutInSessionPipe name="BackEndError" unlessSessionKey="errorCode">
<Param name="errorCode" styleSheetName="Common/xsl/BackEndError.xsl"/>
<Param name="errorReason" xpathExpression="/error/reason"/>
<Param name="errorDetailText" xpathExpression="concat(/error/code, ' ', /error/reason, ' ', /error/details)"/>
<Param name="errorDetailXML" xpathExpression="/error/detailsXml" type="DOMDOC" />
<Forward name="success" path="WrapFo03Response"/>
<PutInSessionPipe
name="BackEndError"
unlessSessionKey="errorCode"
>
<Param name="errorCode" styleSheetName="Common/xsl/BackEndError.xsl" />
<Param name="errorReason" xpathExpression="(//error)[last()]/reason" />
<Param name="errorDetailText" xpathExpression="(//error)[last()]/details" />
<Param name="errorDetailXML" xpathExpression="/error" type="DOMDOC" />
<Forward name="success" path="WrapFo03Response" />
</PutInSessionPipe>

<SoapWrapperPipe
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/BuildInfo.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
instance.version=1.19.14
versionDate_ddmmyyyy=03/07/2024
instance.version=1.19.15
versionDate_ddmmyyyy=10/07/2024
25 changes: 13 additions & 12 deletions src/main/resources/MergeProfileDefaultsWithProfiles-orig.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
function mergeProfileDefaultsWithProfiles(profilesFile){
const json = JSON.parse(profilesFile);
const profileDefaults = {"profile": json["profileDefaults"]};
const profiles = { "profile": json["profile"] };
const profileDefaults = json["profileDefaults"];
const profiles = json["profile"];

let result = {};
result["profile"] = [];
result["profileDefaults"] = json["profileDefaults"];
result["profileDefaults"] = profileDefaults;

if(json["profileDefaults"] == null || json["profile"] == null){
if(profileDefaults == null || profiles == null || Object.keys(profileDefaults).length === 0){
return profilesFile;
}

for(const pf of profiles.profile){
for(const pf of profiles){
let pfres = {};
Object.keys(profileDefaults.profile)
.forEach(key => pfres[key] = profileDefaults.profile[key]);
Object.keys(profileDefaults)
.forEach(key => pfres[key] = profileDefaults[key]);
Object.keys(pf)
.forEach(key => pfres[key] = pf[key]);

if(pf["valueOverrides"] == null){
if(pf["valueOverrides"] == null || profileDefaults["valueOverrides"] == null){
result.profile.push(pfres);
continue;
}

pfres["valueOverrides"] = pf.valueOverrides
.concat(profileDefaults.profile.valueOverrides
.filter((value) => pf.valueOverrides
.find((value2) => value2.key != value.key)));
pfres["valueOverrides"] = [
...pf.valueOverrides,
...profileDefaults.valueOverrides.filter(({key}) => !pf.valueOverrides.some(obj => obj.key === key)
)
];

result.profile.push(pfres);
}
Expand Down
33 changes: 17 additions & 16 deletions src/main/resources/MergeProfileDefaultsWithProfiles.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
"use strict";

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function mergeProfileDefaultsWithProfiles(profilesFile) {
var json = JSON.parse(profilesFile);
var profileDefaults = {
"profile": json["profileDefaults"]
};
var profiles = {
"profile": json["profile"]
};
var profileDefaults = json["profileDefaults"];
var profiles = json["profile"];
var result = {};
result["profile"] = [];
result["profileDefaults"] = json["profileDefaults"];
if (json["profileDefaults"] == null || json["profile"] == null) {
result["profileDefaults"] = profileDefaults;
if (profileDefaults == null || profiles == null || Object.keys(profileDefaults).length === 0) {
return profilesFile;
}
var _iterator = _createForOfIteratorHelper(profiles.profile),
var _iterator = _createForOfIteratorHelper(profiles),
_step;
try {
var _loop = function _loop() {
var pf = _step.value;
var pfres = {};
Object.keys(profileDefaults.profile).forEach(function (key) {
return pfres[key] = profileDefaults.profile[key];
Object.keys(profileDefaults).forEach(function (key) {
return pfres[key] = profileDefaults[key];
});
Object.keys(pf).forEach(function (key) {
return pfres[key] = pf[key];
});
if (pf["valueOverrides"] == null) {
if (pf["valueOverrides"] == null || profileDefaults["valueOverrides"] == null) {
result.profile.push(pfres);
return "continue";
}
pfres["valueOverrides"] = pf.valueOverrides.concat(profileDefaults.profile.valueOverrides.filter(function (value) {
return pf.valueOverrides.find(function (value2) {
return value2.key != value.key;
pfres["valueOverrides"] = [].concat(_toConsumableArray(pf.valueOverrides), _toConsumableArray(profileDefaults.valueOverrides.filter(function (_ref) {
var key = _ref.key;
return !pf.valueOverrides.some(function (obj) {
return obj.key === key;
});
}));
})));
result.profile.push(pfres);
};
for (_iterator.s(); !(_step = _iterator.n()).done;) {
Expand Down

0 comments on commit 47f4496

Please sign in to comment.