Dump env with original source path #57
Merged
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 pull request introduces several enhancements and fixes to the POML handling codebase, focusing on improving resource management, traceability, and test coverage. The most significant changes include the addition of automatic file association for
.pomlresources, enhancements to trace file generation with support for.envfiles, and updates to test cases to validate these new functionalities.Resource Management Enhancements:
autoAddAssociatedFilesmethod inPOMLWebviewPanelto automatically associate context and stylesheet files with.pomlresources if they exist. This ensures consistent handling of related files. (packages/poml-vscode/panel/panel.ts, [1] [2]resourceOptionsupdates inPOMLWebviewPanelto prevent unnecessary data storage for unchanged resources. (packages/poml-vscode/panel/panel.ts, [1] [2]Traceability Improvements:
dumpTracefunction to include.envfile generation, recording theSOURCE_PATHfor.pomlfiles, and creating symlinks to source files for better traceability. (packages/poml/util/trace.ts, [1] [2].) as separators instead of underscores (_) for better readability and consistency. (packages/poml/util/trace.ts, packages/poml/util/trace.tsL83-R112)Test Coverage Enhancements:
.envfile creation, source path recording, and the ability to include associated files during trace dumps. (packages/poml/tests/trace.test.tsx, packages/poml/tests/trace.test.tsxL30-R61)packages/poml/tests/trace.test.tsx, packages/poml/tests/trace.test.tsxL30-R61)File Handling Improvements:
PomlFileto read.envfiles and update thesourcePathdynamically if specified, improving flexibility in handling.pomlresources. (packages/poml/file.tsx, packages/poml/file.tsxR69-R83)Miscellaneous:
fsin multiple files to support new file operations. (packages/poml-vscode/panel/panel.ts, [1];packages/poml/file.tsx, [2]These changes collectively improve the robustness of the system, streamline resource management, and enhance the developer experience through better traceability and testing.