DEMOS-1819-create-excel-report-file#1408
Merged
Merged
Conversation
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
james-becwar-cms
approved these changes
Jun 9, 2026
| CORS_ALLOWED_HEADERS: "Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent" | ||
| CORS_EXPOSE_HEADERS: "ETag" | ||
| CORS_ALLOW_CREDENTIALS: "true" | ||
| S3_SKIP_SIGNATURE_VALIDATION: 0 |
Contributor
There was a problem hiding this comment.
I didn't see this being used?
Contributor
Author
There was a problem hiding this comment.
If you don't enable that, localstack doesn't enforce the timeout of the pre-signed URLs and other things locally.
connor-parke-icf
approved these changes
Jun 9, 2026
connor-parke-icf
left a comment
Contributor
There was a problem hiding this comment.
looks good to me; good find on the S3_SKIP_SIGNATURE_VALIDATION fix. Overall the xlsx formatting looks straightforward. no real comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows for creating of a formatted Excel report file from a query. I went back and forth awhile on the best ways to handle the typing and I feel that this is a good approach.
exceltsas the library for the time being, and added this to the install files. This appears to be a decent, fairly up-to-date, TS-native implementation.queriesinto the same folders as the formerly-calledschemasand renamed it toconfigs.*Config.tsfiles contain all the formatting and type information for a single report.*Query.tsfiles contain the actual SQL query as a multi-line string.*Query.tsfile gets imported into the*Config.tsfile, where we also set up various things like nicely-named string headers, etc.configsthat are in their own file (to avoid circular dependencies with putting them inindex.ts. These types are more generic so that downstream functions are more aware of what should be in every report type in terms of columns, etc.index.tsthere is the exported report configurations, as well as an accessor (which makes some of the mocking of tests easier). This is also where we can infer a type from the Zod configuration for each row, which can be used in the formatting functions.runOnDemandReport.tsimplementation very mildly and simplified the tests by ignoring the types in specific cases where they're not relevant, with comments to document why.formatOnDemandReportInExcel.tswith very simple formatting for now; however, my hope is that if we need to add complexity, it can become part of the report configuration, and be passed into the function, keeping it fairly generic.Some housekeeping items:
S3_SKIP_SIGNATURE_VALIDATIONto the docker-compose.yml file for local dev; this makeslocalstackenforce the timeout on download links among other things.concurrentlyto close a critical security bug; only used in dev dependencies.