Skip to content

Commit 7cc7e08

Browse files
committed
chore: address simplify findings
- Drop redundant `npm cache clean --force` after `npm ci` (no-op). - Add `*.log`, `.env.*`, `coverage`, `.vitest-cache` to .dockerignore. - Add isSecretRef test for bare `var:` (undefined) in YAML.
1 parent 93fe66d commit 7cc7e08

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ scripts
2121

2222
# Local secrets / configs
2323
.env
24+
.env.*
2425
.env.example
2526
CLAUDE.local.md
2627

28+
# Local artifacts
29+
*.log
30+
coverage
31+
.vitest-cache
32+
2733
# Repo metadata not needed in image
2834
README.md
2935
CONTRIBUTING.md

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ENV NODE_ENV=production
1919
ENV CYCLING_COACH_HOME=/data
2020

2121
COPY package.json package-lock.json ./
22-
RUN npm ci --omit=dev && npm cache clean --force
22+
RUN npm ci --omit=dev
2323

2424
COPY --from=builder /app/dist ./dist
2525
COPY SOUL.md ./SOUL.md

tests/secrets/types.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ describe("isSecretRef", () => {
6969
it("rejects env shape missing var", () => {
7070
expect(isSecretRef({ source: "env" })).toBe(false);
7171
});
72+
73+
it("rejects env shape with undefined var (e.g., bare 'var:' in YAML)", () => {
74+
expect(isSecretRef({ source: "env", var: undefined })).toBe(false);
75+
});
7276
});
7377

7478
describe("SecretResolutionError", () => {

0 commit comments

Comments
 (0)