|
| 1 | +# Working Solutions |
| 2 | + |
| 3 | +Use this when you are stuck, want to compare your work with a known-good lesson state, or want to jump straight to the working implementation for the current lab. |
| 4 | + |
| 5 | +This workshop is not graded. Peeking is allowed. |
| 6 | + |
| 7 | +This fast-forward guide covers Labs `00` through `05`. Optional Lab `06` does not have a one-command fast-forward path here. |
| 8 | + |
| 9 | +## Fastest path |
| 10 | + |
| 11 | +From your repo root, run the fast-forward helper for the lab you want: |
| 12 | + |
| 13 | +```bash |
| 14 | +node scripts/fast-forward-student-lab.js --lab 00 --target . |
| 15 | +node scripts/fast-forward-student-lab.js --lab 01 --target . |
| 16 | +node scripts/fast-forward-student-lab.js --lab 02 --target . |
| 17 | +node scripts/fast-forward-student-lab.js --lab 03 --target . |
| 18 | +node scripts/fast-forward-student-lab.js --lab 04 --target . |
| 19 | +node scripts/fast-forward-student-lab.js --lab 05 --target . |
| 20 | +``` |
| 21 | + |
| 22 | +If you want to see what will change before writing files: |
| 23 | + |
| 24 | +```bash |
| 25 | +node scripts/fast-forward-student-lab.js --lab 03 --target . --dry-run |
| 26 | +``` |
| 27 | + |
| 28 | +## After you fast-forward |
| 29 | + |
| 30 | +Run the matching lab check: |
| 31 | + |
| 32 | +```bash |
| 33 | +pnpm lab:check -- --lab 00 --start --verbose |
| 34 | +pnpm lab:check -- --lab 01 --start --verbose |
| 35 | +pnpm lab:check -- --lab 02 --start --verbose |
| 36 | +pnpm lab:check -- --lab 03 --start --verbose |
| 37 | +pnpm lab:check -- --lab 04 --start --verbose |
| 38 | +pnpm lab:check -- --lab 05 --start --verbose |
| 39 | +``` |
| 40 | + |
| 41 | +Equivalent form: |
| 42 | + |
| 43 | +```bash |
| 44 | +LAB_ID=03 pnpm classroom:check |
| 45 | +``` |
| 46 | + |
| 47 | +## Important note |
| 48 | + |
| 49 | +- Lab 00 restores the starter scaffold. |
| 50 | +- Labs 01-05 copy the working integrated files for that lesson edit surface. |
| 51 | +- Those integrated files may already contain later-lab behavior around the exact lesson logic, so always verify with the matching `pnpm lab:check` command or `LAB_ID`. |
| 52 | + |
| 53 | +## Which files get replaced |
| 54 | + |
| 55 | +- Lab 00: `issuer/src/index.ts`, `verifier/src/index.ts` |
| 56 | +- Lab 01: `issuer/src/index.ts`, `verifier/src/index.ts` |
| 57 | +- Lab 02: `issuer/src/index.ts`, `verifier/src/index.ts`, `bbs-lib/src/index.ts` |
| 58 | +- Lab 03: `issuer/src/index.ts`, `verifier/src/index.ts` |
| 59 | +- Lab 04: `issuer/src/index.ts`, `verifier/src/index.ts` |
| 60 | +- Lab 05: `issuer/src/index.ts`, `verifier/src/index.ts` |
| 61 | + |
| 62 | +## When to use this |
| 63 | + |
| 64 | +- You want to keep moving and understand the flow instead of debugging every step live. |
| 65 | +- You want a clean baseline before trying the lab again. |
| 66 | +- You want to compare your implementation with the working one side by side. |
0 commit comments