Files
klz-cables.com/.pnpm-store/v10/files/4f/59583457939c15b31bc0564797e2644322afd2bc663a567db1db284cff3907c7d8ce8e72bffd13e53885b3efd146cb4b5413ebe61c6af4116493a7a960f26a
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
1009 B
Plaintext

{"version":3,"file":"with-options.cjs","names":["options"],"sources":["../../../src/rest/helpers/with-options.ts"],"sourcesContent":["import type { RequestTransformer } from '../../index.js';\nimport type { RestCommand } from '../types.js';\n\n/**\n * Add arbitrary options to a fetch request\n *\n * @param getOptions\n * @param onRequest\n *\n * @returns\n */\nexport function withOptions<Schema, Output>(\n\tgetOptions: RestCommand<Output, Schema>,\n\textraOptions: RequestTransformer | Partial<RequestInit>,\n): RestCommand<Output, Schema> {\n\treturn () => {\n\t\tconst options = getOptions();\n\n\t\tif (typeof extraOptions === 'function') {\n\t\t\toptions.onRequest = extraOptions;\n\t\t} else {\n\t\t\toptions.onRequest = (options) => ({\n\t\t\t\t...options,\n\t\t\t\t...extraOptions,\n\t\t\t});\n\t\t}\n\n\t\treturn options;\n\t};\n}\n"],"mappings":"AAWA,SAAgB,EACf,EACA,EAC8B,CAC9B,UAAa,CACZ,IAAM,EAAU,GAAY,CAW5B,OATI,OAAO,GAAiB,WAC3B,EAAQ,UAAY,EAEpB,EAAQ,UAAa,IAAa,CACjC,GAAGA,EACH,GAAG,EACH,EAGK"}