Skip to content

Commit

Permalink
chore: bump planx-core (#2765)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak authored Feb 8, 2024
1 parent 31718c6 commit b291c83
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 27 deletions.
8 changes: 4 additions & 4 deletions api.planx.uk/modules/send/utils/exportZip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ export async function buildSubmissionExportZip({
}

// add remote files on S3 to the zip
const files = new Passport(passport).files();
const files = new Passport(passport).files;
if (files.length) {
for (const fileURL of files) {
for (const file of files) {
// Ensure unique filename by combining original filename and S3 folder name, which is a nanoid
// Uniform requires all uploaded files to be present in the zip, even if they are duplicates
// Must match unique filename in editor.planx.uk/src/@planx/components/Send/uniform/xml.ts
const uniqueFilename = decodeURIComponent(
fileURL.split("/").slice(-2).join("-"),
file.url.split("/").slice(-2).join("-"),
);
await zip.addRemoteFile({ url: fileURL, name: uniqueFilename });
await zip.addRemoteFile({ url: file.url, name: uniqueFilename });
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ export const deleteApplicationFiles: Operation = async () => {
if (!session) {
throw Error(`Unable to find session matching id ${sessionId}`);
}
const files = new Passport(session.data.passport).files();
const files = new Passport(session.data.passport).files;
if (files.length) {
const deleted = await deleteFilesByURL(files);
const fileURLs = files.map((file) => file.url);
const deleted = await deleteFilesByURL(fileURLs);
deletedFiles.push(...deleted);
}
}
Expand Down
2 changes: 1 addition & 1 deletion api.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@airbrake/node": "^2.1.8",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d74afe2",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#1959a5d",
"@types/isomorphic-fetch": "^0.0.36",
"adm-zip": "^0.5.10",
"aws-sdk": "^2.1467.0",
Expand Down
8 changes: 4 additions & 4 deletions api.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/tests/api-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"@cucumber/cucumber": "^9.3.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d74afe2",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#1959a5d",
"axios": "^1.6.0",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
Expand Down
8 changes: 4 additions & 4 deletions e2e/tests/api-driven/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/tests/ui-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"postinstall": "./install-dependencies.sh"
},
"dependencies": {
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d74afe2",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#1959a5d",
"axios": "^1.6.2",
"dotenv": "^16.3.1",
"eslint": "^8.56.0",
Expand Down
8 changes: 4 additions & 4 deletions e2e/tests/ui-driven/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion editor.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@mui/styles": "^5.15.2",
"@mui/utils": "^5.15.2",
"@opensystemslab/map": "^0.8.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d74afe2",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#1959a5d",
"@tiptap/core": "^2.0.3",
"@tiptap/extension-bold": "^2.0.3",
"@tiptap/extension-bubble-menu": "^2.1.13",
Expand Down
10 changes: 5 additions & 5 deletions editor.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b291c83

Please sign in to comment.