Repository navigation
Conversation
auth.guard.ts and guards.module.ts rendered "Generated at: <now>", so apso generate rewrote both files on every run of an auth-enabled project, even with no schema change. Remove the line from both templates, finishing 39679b1, which dropped the same timestamp from the shared header for regen churn and PII. Stop supplying generatedAt / generatedBy too: withGeneratedMeta (added them to every render) is deleted, and generateGuards no longer sets its own copy. No other template read either field. New test generates the guards twice and expects identical output. fixes #129
The JWT and API-key guard templates (added in 0.45, after #152 was opened) print the same "Generated at" line. With generatedAt gone from the template data they would render "Generated at: undefined", so the line goes from them as well. Extends Devin's regeneration test to both. Co-authored-by: Devin <devinpadron28@gmail.com>
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.
Carries @devinpadron1's fix from #152 onto current main, with his commit and authorship intact, and extends it to the two guard templates added since.
apso generaterenderedGenerated at: <now>into the guard files, so every run of an auth-enabled project rewrote them even with no schema change (#129).auth.guard.etaandguards.module.eta, stops passinggeneratedAt/generatedBy, deletes the unusedwithGeneratedMeta, and adds a test that generates twice and expects identical output. The only change from fix(generate): drop the generation timestamp from guard templates #152 is a conflict resolution intypescript.tsthat keeps main's newerjwtandapiKeyfields.jwt-auth.guard.etaandapi-key-auth.guard.eta(added in 0.45). Without it they would renderGenerated at: undefined. Extends the regeneration test to both.The stale-file cleanup from #162 keys on the separate "Generated with Apso" header, so it is unaffected.
tsc clean, lint 0 errors, 520 tests pass.
Fixes #129. Supersedes #152.