Skip to content

Commit 7ba0553

Browse files
committed
fix(cookbook): quote step values in legacy-customer-account-flow recipe
YAML parses bare `step: 1` as a JavaScript number, but the Zod schema (StepSchema.step) expects z.string().regex(/^\d+(?:\.\d+)?$/). This type mismatch caused all 6 legacy-customer-account-flow e2e tests to fail at fixture generation time with: RecipeSchema: Invalid input: expected string, received number Quoting the values (`step: "1"`) forces YAML to preserve them as strings, matching what the schema requires.
1 parent f788bcc commit 7ba0553

File tree

1 file changed

+16
-16
lines changed
  • cookbook/recipes/legacy-customer-account-flow

1 file changed

+16
-16
lines changed

cookbook/recipes/legacy-customer-account-flow/recipe.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,108 +46,108 @@ ingredients:
4646
deletedFiles: []
4747
steps:
4848
- type: PATCH
49-
step: 1
49+
step: "1"
5050
name: Document legacy customer accounts in the README
5151
description: Update the README file to document the legacy customer account flow.
5252
diffs:
5353
- file: README.md
5454
patchFile: README.md.a0354d.patch
5555
- type: PATCH
56-
step: 2
56+
step: "2"
5757
name: Add account link to header navigation
5858
description: Add an account link to the header navigation.
5959
diffs:
6060
- file: app/components/Header.tsx
6161
patchFile: Header.tsx.994c25.patch
6262
- type: NEW_FILE
63-
step: 3
63+
step: "3"
6464
name: Create account activation flow
6565
description: Add an account activation route for email verification.
6666
ingredients:
6767
- path: templates/skeleton/app/routes/account_.activate.$id.$activationToken.tsx
6868
- type: PATCH
69-
step: 4
69+
step: "4"
7070
name: Update PageLayout for legacy auth
7171
description: Update PageLayout to handle account routes.
7272
diffs:
7373
- file: app/components/PageLayout.tsx
7474
patchFile: PageLayout.tsx.145dab.patch
7575
- type: NEW_FILE
76-
step: 5
76+
step: "5"
7777
name: Build password recovery flow
7878
description: Add a password recovery form.
7979
ingredients:
8080
- path: templates/skeleton/app/routes/account_.recover.tsx
8181
- type: PATCH
82-
step: 6
82+
step: "6"
8383
name: Validate customer access tokens
8484
description: Add customer access token validation to the root loader.
8585
diffs:
8686
- file: app/root.tsx
8787
patchFile: root.tsx.8c60e9.patch
8888
- type: NEW_FILE
89-
step: 7
89+
step: "7"
9090
name: Create customer registration flow
9191
description: Add a customer registration form.
9292
ingredients:
9393
- path: templates/skeleton/app/routes/account_.register.tsx
9494
- type: PATCH
95-
step: 8
95+
step: "8"
9696
name: Handle unauthenticated account routes
9797
description: Convert the catch-all route to use Storefront API authentication.
9898
diffs:
9999
- file: app/routes/account.$.tsx
100100
patchFile: account.$.tsx.5ed838.patch
101101
- type: NEW_FILE
102-
step: 9
102+
step: "9"
103103
name: Build password reset flow
104104
description: Add a password reset form with token validation.
105105
ingredients:
106106
- path: templates/skeleton/app/routes/account_.reset.$id.$resetToken.tsx
107107
- type: PATCH
108-
step: 10
108+
step: "10"
109109
name: Add address management
110110
description: Convert address management to use Storefront API mutations.
111111
diffs:
112112
- file: app/routes/account.addresses.tsx
113113
patchFile: account.addresses.tsx.f3bb60.patch
114114
- type: PATCH
115-
step: 11
115+
step: "11"
116116
name: Show order details
117117
description: Convert the order details page to use Storefront API queries.
118118
diffs:
119119
- file: app/routes/account.orders.$id.tsx
120120
patchFile: account.orders.$id.tsx.56d9c4.patch
121121
- type: PATCH
122-
step: 12
122+
step: "12"
123123
name: Display order history
124124
description: Convert the orders list to use the Storefront API with pagination.
125125
diffs:
126126
- file: app/routes/account.orders._index.tsx
127127
patchFile: account.orders._index.tsx.8942cc.patch
128128
- type: PATCH
129-
step: 13
129+
step: "13"
130130
name: Build customer profile page
131131
description: Convert the customer profile page to use Storefront API queries.
132132
diffs:
133133
- file: app/routes/account.profile.tsx
134134
patchFile: account.profile.tsx.8e4050.patch
135135
- type: PATCH
136-
step: 14
136+
step: "14"
137137
name: Update account layout for session auth
138138
description: Convert the account layout to use session-based authentication.
139139
diffs:
140140
- file: app/routes/account.tsx
141141
patchFile: account.tsx.30f6e3.patch
142142
- type: PATCH
143-
step: 15
143+
step: "15"
144144
name: Create login page
145145
description: Replace the Customer Account API login with the Storefront API form.
146146
diffs:
147147
- file: app/routes/account_.login.tsx
148148
patchFile: account_.login.tsx.d75928.patch
149149
- type: PATCH
150-
step: 16
150+
step: "16"
151151
name: Handle logout and session cleanup
152152
description: Replace the Customer Account API logout with a session cleanup.
153153
diffs:

0 commit comments

Comments
 (0)