@kubb/plugin-cypress 5.0.0-alpha.23 → 5.0.0-alpha.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ import { camelCase } from '@internals/utils'
2
+ import { defineResolver } from '@kubb/core'
3
+ import type { PluginCypress } from '../types.ts'
4
+
5
+ /**
6
+ * Resolver for `@kubb/plugin-cypress` that provides the default naming
7
+ * and path-resolution helpers used by the plugin.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { resolverCypress } from '@kubb/plugin-cypress'
12
+ *
13
+ * resolverCypress.default('list pets', 'function') // -> 'listPets'
14
+ * resolverCypress.resolveName('show pet by id') // -> 'showPetById'
15
+ * ```
16
+ */
17
+ export const resolverCypress = defineResolver<PluginCypress>(() => ({
18
+ name: 'default',
19
+ pluginName: 'plugin-cypress',
20
+ default(name, type) {
21
+ return camelCase(name, { isFile: type === 'file' })
22
+ },
23
+ resolveName(name) {
24
+ return this.default(name, 'function')
25
+ },
26
+ }))
package/src/types.ts CHANGED
@@ -1,20 +1,77 @@
1
- import type { Group, Output, PluginFactoryOptions, ResolveNameParams } from '@kubb/core'
1
+ import type { Visitor } from '@kubb/ast/types'
2
+ import type {
3
+ CompatibilityPreset,
4
+ Exclude,
5
+ Generator,
6
+ Group,
7
+ Include,
8
+ Output,
9
+ Override,
10
+ PluginFactoryOptions,
11
+ ResolvePathOptions,
12
+ Resolver,
13
+ UserGroup,
14
+ } from '@kubb/core'
2
15
 
3
- import type { contentType, Oas } from '@kubb/oas'
4
- import type { Exclude, Include, Override, ResolvePathOptions } from '@kubb/plugin-oas'
5
- import type { Generator } from '@kubb/plugin-oas/generators'
16
+ /**
17
+ * The concrete resolver type for `@kubb/plugin-cypress`.
18
+ * Extends the base `Resolver` with a `resolveName` helper for operation function names.
19
+ */
20
+ export type ResolverCypress = Resolver & {
21
+ /**
22
+ * Resolves the function name for a given raw operation name.
23
+ * @example
24
+ * resolver.resolveName('show pet by id') // -> 'showPetById'
25
+ */
26
+ resolveName(name: string): string
27
+ }
28
+
29
+ /**
30
+ * Discriminated union that ties `pathParamsType` to the `paramsType` values where it is meaningful.
31
+ *
32
+ * - `paramsType: 'object'` — all parameters (including path params) are merged into a single
33
+ * destructured object. `pathParamsType` is never reached in this code path and has no effect.
34
+ * - `paramsType?: 'inline'` (or omitted) — each parameter group is a separate function argument.
35
+ * `pathParamsType` controls whether the path-param group itself is destructured (`'object'`)
36
+ * or spread as individual arguments (`'inline'`).
37
+ */
38
+ type ParamsTypeOptions =
39
+ | {
40
+ /**
41
+ * All parameters — path, query, headers, and body — are merged into a single
42
+ * destructured object argument.
43
+ * - 'object' returns the params and pathParams as an object.
44
+ * @default 'inline'
45
+ */
46
+ paramsType: 'object'
47
+ /**
48
+ * `pathParamsType` has no effect when `paramsType` is `'object'`.
49
+ * Path params are already inside the single destructured object.
50
+ */
51
+ pathParamsType?: never
52
+ }
53
+ | {
54
+ /**
55
+ * Each parameter group is emitted as a separate function argument.
56
+ * - 'inline' returns the params as comma separated params.
57
+ * @default 'inline'
58
+ */
59
+ paramsType?: 'inline'
60
+ /**
61
+ * Controls how path parameters are arranged within the inline argument list.
62
+ * - 'object' groups path params into a destructured object: `{ petId }: PathParams`.
63
+ * - 'inline' emits each path param as its own argument: `petId: string`.
64
+ * @default 'inline'
65
+ */
66
+ pathParamsType?: 'object' | 'inline'
67
+ }
6
68
 
7
69
  export type Options = {
8
70
  /**
9
- * Specify the export location for the files and define the behavior of the output
71
+ * Specify the export location for the files and define the behavior of the output.
10
72
  * @default { path: 'cypress', barrelType: 'named' }
11
73
  */
12
- output?: Output<Oas>
13
- /**
14
- * Define which contentType should be used.
15
- * By default, the first JSON valid mediaType is used
16
- */
17
- contentType?: contentType
74
+ output?: Output
18
75
  /**
19
76
  * Return type when calling cy.request.
20
77
  * - 'data' returns ResponseConfig[data].
@@ -23,29 +80,18 @@ export type Options = {
23
80
  */
24
81
  dataReturnType?: 'data' | 'full'
25
82
  /**
26
- * How to style your params, by default no casing is applied
27
- * - 'camelcase' uses camelcase for the params names
83
+ * How to style your params, by default no casing is applied.
84
+ * - 'camelcase' uses camelCase for the params names.
28
85
  */
29
86
  paramsCasing?: 'camelcase'
30
87
  /**
31
- * How to pass your params.
32
- * - 'object' returns the params and pathParams as an object.
33
- * - 'inline' returns the params as comma separated params.
34
- * @default 'inline'
35
- */
36
- paramsType?: 'object' | 'inline'
37
- /**
38
- * How to pass your pathParams.
39
- * - 'object' returns the pathParams as an object.
40
- * - 'inline' returns the pathParams as comma separated params.
41
- * @default 'inline'
88
+ * Base URL prepended to every generated request URL.
42
89
  */
43
- pathParamsType?: 'object' | 'inline'
44
90
  baseURL?: string
45
91
  /**
46
92
  * Group the Cypress requests based on the provided name.
47
93
  */
48
- group?: Group
94
+ group?: UserGroup
49
95
  /**
50
96
  * Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
51
97
  */
@@ -58,26 +104,38 @@ export type Options = {
58
104
  * Array containing override parameters to override `options` based on tags/operations/methods/paths.
59
105
  */
60
106
  override?: Array<Override<ResolvedOptions>>
61
- transformers?: {
62
- /**
63
- * Customize the names based on the type that is provided by the plugin.
64
- */
65
- name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string
66
- }
67
107
  /**
68
- * Define some generators next to the Cypress generators.
108
+ * Apply a compatibility naming preset.
109
+ * @default 'default'
110
+ */
111
+ compatibilityPreset?: CompatibilityPreset
112
+ /**
113
+ * Array of named resolvers that control naming conventions.
114
+ * Later entries override earlier ones (last wins).
115
+ * @default [resolverCypress]
116
+ */
117
+ resolvers?: Array<ResolverCypress>
118
+ /**
119
+ * Array of AST visitors applied to each node before printing.
120
+ * Uses `transform()` from `@kubb/ast`.
121
+ */
122
+ transformers?: Array<Visitor>
123
+ /**
124
+ * Define some generators next to the default generators.
69
125
  */
70
126
  generators?: Array<Generator<PluginCypress>>
71
- }
127
+ } & ParamsTypeOptions
72
128
 
73
129
  type ResolvedOptions = {
74
- output: Output<Oas>
75
- group: Options['group']
130
+ output: Output
131
+ group: Group | undefined
76
132
  baseURL: Options['baseURL'] | undefined
77
133
  dataReturnType: NonNullable<Options['dataReturnType']>
78
- pathParamsType: NonNullable<Options['pathParamsType']>
134
+ pathParamsType: NonNullable<NonNullable<Options['pathParamsType']>>
79
135
  paramsType: NonNullable<Options['paramsType']>
80
136
  paramsCasing: Options['paramsCasing']
137
+ resolver: ResolverCypress
138
+ transformers: Array<Visitor>
81
139
  }
82
140
 
83
- export type PluginCypress = PluginFactoryOptions<'plugin-cypress', Options, ResolvedOptions, never, ResolvePathOptions>
141
+ export type PluginCypress = PluginFactoryOptions<'plugin-cypress', Options, ResolvedOptions, never, ResolvePathOptions, ResolverCypress>
@@ -1,310 +0,0 @@
1
- import "./chunk--u3MIqq1.js";
2
- import { getPathParams } from "@kubb/plugin-oas/utils";
3
- import { File, Function as Function$1, FunctionParams } from "@kubb/react-fabric";
4
- import { isAllOptional, isOptional } from "@kubb/oas";
5
- import { jsx } from "@kubb/react-fabric/jsx-runtime";
6
- //#region ../../internals/utils/src/casing.ts
7
- /**
8
- * Shared implementation for camelCase and PascalCase conversion.
9
- * Splits on common word boundaries (spaces, hyphens, underscores, dots, slashes, colons)
10
- * and capitalizes each word according to `pascal`.
11
- *
12
- * When `pascal` is `true` the first word is also capitalized (PascalCase), otherwise only subsequent words are.
13
- */
14
- function toCamelOrPascal(text, pascal) {
15
- return text.trim().replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/(\d)([a-z])/g, "$1 $2").split(/[\s\-_./\\:]+/).filter(Boolean).map((word, i) => {
16
- if (word.length > 1 && word === word.toUpperCase()) return word;
17
- if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1);
18
- return word.charAt(0).toUpperCase() + word.slice(1);
19
- }).join("").replace(/[^a-zA-Z0-9]/g, "");
20
- }
21
- /**
22
- * Splits `text` on `.` and applies `transformPart` to each segment.
23
- * The last segment receives `isLast = true`, all earlier segments receive `false`.
24
- * Segments are joined with `/` to form a file path.
25
- *
26
- * Only splits on dots followed by a letter so that version numbers
27
- * embedded in operationIds (e.g. `v2025.0`) are kept intact.
28
- */
29
- function applyToFileParts(text, transformPart) {
30
- const parts = text.split(/\.(?=[a-zA-Z])/);
31
- return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join("/");
32
- }
33
- /**
34
- * Converts `text` to camelCase.
35
- * When `isFile` is `true`, dot-separated segments are each cased independently and joined with `/`.
36
- *
37
- * @example
38
- * camelCase('hello-world') // 'helloWorld'
39
- * camelCase('pet.petId', { isFile: true }) // 'pet/petId'
40
- */
41
- function camelCase(text, { isFile, prefix = "", suffix = "" } = {}) {
42
- if (isFile) return applyToFileParts(text, (part, isLast) => camelCase(part, isLast ? {
43
- prefix,
44
- suffix
45
- } : {}));
46
- return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false);
47
- }
48
- //#endregion
49
- //#region ../../internals/utils/src/reserved.ts
50
- /**
51
- * Returns `true` when `name` is a syntactically valid JavaScript variable name.
52
- *
53
- * @example
54
- * ```ts
55
- * isValidVarName('status') // true
56
- * isValidVarName('class') // false (reserved word)
57
- * isValidVarName('42foo') // false (starts with digit)
58
- * ```
59
- */
60
- function isValidVarName(name) {
61
- try {
62
- new Function(`var ${name}`);
63
- } catch {
64
- return false;
65
- }
66
- return true;
67
- }
68
- //#endregion
69
- //#region ../../internals/utils/src/urlPath.ts
70
- /**
71
- * Parses and transforms an OpenAPI/Swagger path string into various URL formats.
72
- *
73
- * @example
74
- * const p = new URLPath('/pet/{petId}')
75
- * p.URL // '/pet/:petId'
76
- * p.template // '`/pet/${petId}`'
77
- */
78
- var URLPath = class {
79
- /**
80
- * The raw OpenAPI/Swagger path string, e.g. `/pet/{petId}`.
81
- */
82
- path;
83
- #options;
84
- constructor(path, options = {}) {
85
- this.path = path;
86
- this.#options = options;
87
- }
88
- /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`.
89
- *
90
- * @example
91
- * ```ts
92
- * new URLPath('/pet/{petId}').URL // '/pet/:petId'
93
- * ```
94
- */
95
- get URL() {
96
- return this.toURLPath();
97
- }
98
- /** Returns `true` when `path` is a fully-qualified URL (e.g. starts with `https://`).
99
- *
100
- * @example
101
- * ```ts
102
- * new URLPath('https://petstore.swagger.io/v2/pet').isURL // true
103
- * new URLPath('/pet/{petId}').isURL // false
104
- * ```
105
- */
106
- get isURL() {
107
- try {
108
- return !!new URL(this.path).href;
109
- } catch {
110
- return false;
111
- }
112
- }
113
- /**
114
- * Converts the OpenAPI path to a TypeScript template literal string.
115
- *
116
- * @example
117
- * new URLPath('/pet/{petId}').template // '`/pet/${petId}`'
118
- * new URLPath('/account/monetary-accountID').template // '`/account/${monetaryAccountId}`'
119
- */
120
- get template() {
121
- return this.toTemplateString();
122
- }
123
- /** Returns the path and its extracted params as a structured `URLObject`, or as a stringified expression when `stringify` is set.
124
- *
125
- * @example
126
- * ```ts
127
- * new URLPath('/pet/{petId}').object
128
- * // { url: '/pet/:petId', params: { petId: 'petId' } }
129
- * ```
130
- */
131
- get object() {
132
- return this.toObject();
133
- }
134
- /** Returns a map of path parameter names, or `undefined` when the path has no parameters.
135
- *
136
- * @example
137
- * ```ts
138
- * new URLPath('/pet/{petId}').params // { petId: 'petId' }
139
- * new URLPath('/pet').params // undefined
140
- * ```
141
- */
142
- get params() {
143
- return this.getParams();
144
- }
145
- #transformParam(raw) {
146
- const param = isValidVarName(raw) ? raw : camelCase(raw);
147
- return this.#options.casing === "camelcase" ? camelCase(param) : param;
148
- }
149
- /**
150
- * Iterates over every `{param}` token in `path`, calling `fn` with the raw token and transformed name.
151
- */
152
- #eachParam(fn) {
153
- for (const match of this.path.matchAll(/\{([^}]+)\}/g)) {
154
- const raw = match[1];
155
- fn(raw, this.#transformParam(raw));
156
- }
157
- }
158
- toObject({ type = "path", replacer, stringify } = {}) {
159
- const object = {
160
- url: type === "path" ? this.toURLPath() : this.toTemplateString({ replacer }),
161
- params: this.getParams()
162
- };
163
- if (stringify) {
164
- if (type === "template") return JSON.stringify(object).replaceAll("'", "").replaceAll(`"`, "");
165
- if (object.params) return `{ url: '${object.url}', params: ${JSON.stringify(object.params).replaceAll("'", "").replaceAll(`"`, "")} }`;
166
- return `{ url: '${object.url}' }`;
167
- }
168
- return object;
169
- }
170
- /**
171
- * Converts the OpenAPI path to a TypeScript template literal string.
172
- * An optional `replacer` can transform each extracted parameter name before interpolation.
173
- *
174
- * @example
175
- * new URLPath('/pet/{petId}').toTemplateString() // '`/pet/${petId}`'
176
- */
177
- toTemplateString({ prefix = "", replacer } = {}) {
178
- return `\`${prefix}${this.path.split(/\{([^}]+)\}/).map((part, i) => {
179
- if (i % 2 === 0) return part;
180
- const param = this.#transformParam(part);
181
- return `\${${replacer ? replacer(param) : param}}`;
182
- }).join("")}\``;
183
- }
184
- /**
185
- * Extracts all `{param}` segments from the path and returns them as a key-value map.
186
- * An optional `replacer` transforms each parameter name in both key and value positions.
187
- * Returns `undefined` when no path parameters are found.
188
- *
189
- * @example
190
- * ```ts
191
- * new URLPath('/pet/{petId}/tag/{tagId}').getParams()
192
- * // { petId: 'petId', tagId: 'tagId' }
193
- * ```
194
- */
195
- getParams(replacer) {
196
- const params = {};
197
- this.#eachParam((_raw, param) => {
198
- const key = replacer ? replacer(param) : param;
199
- params[key] = key;
200
- });
201
- return Object.keys(params).length > 0 ? params : void 0;
202
- }
203
- /** Converts the OpenAPI path to Express-style colon syntax.
204
- *
205
- * @example
206
- * ```ts
207
- * new URLPath('/pet/{petId}').toURLPath() // '/pet/:petId'
208
- * ```
209
- */
210
- toURLPath() {
211
- return this.path.replace(/\{([^}]+)\}/g, ":$1");
212
- }
213
- };
214
- //#endregion
215
- //#region src/components/Request.tsx
216
- function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
217
- if (paramsType === "object") {
218
- const pathParams = getPathParams(typeSchemas.pathParams, {
219
- typed: true,
220
- casing: paramsCasing
221
- });
222
- return FunctionParams.factory({
223
- data: {
224
- mode: "object",
225
- children: {
226
- ...pathParams,
227
- data: typeSchemas.request?.name ? {
228
- type: typeSchemas.request?.name,
229
- optional: isOptional(typeSchemas.request?.schema)
230
- } : void 0,
231
- params: typeSchemas.queryParams?.name ? {
232
- type: typeSchemas.queryParams?.name,
233
- optional: isOptional(typeSchemas.queryParams?.schema)
234
- } : void 0,
235
- headers: typeSchemas.headerParams?.name ? {
236
- type: typeSchemas.headerParams?.name,
237
- optional: isOptional(typeSchemas.headerParams?.schema)
238
- } : void 0
239
- }
240
- },
241
- options: {
242
- type: "Partial<Cypress.RequestOptions>",
243
- default: "{}"
244
- }
245
- });
246
- }
247
- return FunctionParams.factory({
248
- pathParams: typeSchemas.pathParams?.name ? {
249
- mode: pathParamsType === "object" ? "object" : "inlineSpread",
250
- children: getPathParams(typeSchemas.pathParams, {
251
- typed: true,
252
- casing: paramsCasing
253
- }),
254
- default: isAllOptional(typeSchemas.pathParams?.schema) ? "{}" : void 0
255
- } : void 0,
256
- data: typeSchemas.request?.name ? {
257
- type: typeSchemas.request?.name,
258
- optional: isOptional(typeSchemas.request?.schema)
259
- } : void 0,
260
- params: typeSchemas.queryParams?.name ? {
261
- type: typeSchemas.queryParams?.name,
262
- optional: isOptional(typeSchemas.queryParams?.schema)
263
- } : void 0,
264
- headers: typeSchemas.headerParams?.name ? {
265
- type: typeSchemas.headerParams?.name,
266
- optional: isOptional(typeSchemas.headerParams?.schema)
267
- } : void 0,
268
- options: {
269
- type: "Partial<Cypress.RequestOptions>",
270
- default: "{}"
271
- }
272
- });
273
- }
274
- function Request({ baseURL = "", name, dataReturnType, typeSchemas, url, method, paramsType, paramsCasing, pathParamsType }) {
275
- const path = new URLPath(url, { casing: paramsCasing });
276
- const params = getParams({
277
- paramsType,
278
- paramsCasing,
279
- pathParamsType,
280
- typeSchemas
281
- });
282
- const returnType = dataReturnType === "data" ? `Cypress.Chainable<${typeSchemas.response.name}>` : `Cypress.Chainable<Cypress.Response<${typeSchemas.response.name}>>`;
283
- const urlTemplate = path.toTemplateString({ prefix: baseURL });
284
- const requestOptions = [`method: '${method}'`, `url: ${urlTemplate}`];
285
- if (typeSchemas.queryParams?.name) requestOptions.push("qs: params");
286
- if (typeSchemas.headerParams?.name) requestOptions.push("headers");
287
- if (typeSchemas.request?.name) requestOptions.push("body: data");
288
- requestOptions.push("...options");
289
- return /* @__PURE__ */ jsx(File.Source, {
290
- name,
291
- isIndexable: true,
292
- isExportable: true,
293
- children: /* @__PURE__ */ jsx(Function$1, {
294
- name,
295
- export: true,
296
- params: params.toConstructor(),
297
- returnType,
298
- children: dataReturnType === "data" ? `return cy.request<${typeSchemas.response.name}>({
299
- ${requestOptions.join(",\n ")}
300
- }).then((res) => res.body)` : `return cy.request<${typeSchemas.response.name}>({
301
- ${requestOptions.join(",\n ")}
302
- })`
303
- })
304
- });
305
- }
306
- Request.getParams = getParams;
307
- //#endregion
308
- export { camelCase as n, Request as t };
309
-
310
- //# sourceMappingURL=components-BO5E__bN.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"components-BO5E__bN.js","names":["#options","#transformParam","#eachParam","Function"],"sources":["../../../internals/utils/src/casing.ts","../../../internals/utils/src/reserved.ts","../../../internals/utils/src/urlPath.ts","../src/components/Request.tsx"],"sourcesContent":["type Options = {\n /**\n * When `true`, dot-separated segments are split on `.` and joined with `/` after casing.\n */\n isFile?: boolean\n /**\n * Text prepended before casing is applied.\n */\n prefix?: string\n /**\n * Text appended before casing is applied.\n */\n suffix?: string\n}\n\n/**\n * Shared implementation for camelCase and PascalCase conversion.\n * Splits on common word boundaries (spaces, hyphens, underscores, dots, slashes, colons)\n * and capitalizes each word according to `pascal`.\n *\n * When `pascal` is `true` the first word is also capitalized (PascalCase), otherwise only subsequent words are.\n */\nfunction toCamelOrPascal(text: string, pascal: boolean): string {\n const normalized = text\n .trim()\n .replace(/([a-z\\d])([A-Z])/g, '$1 $2')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')\n .replace(/(\\d)([a-z])/g, '$1 $2')\n\n const words = normalized.split(/[\\s\\-_./\\\\:]+/).filter(Boolean)\n\n return words\n .map((word, i) => {\n const allUpper = word.length > 1 && word === word.toUpperCase()\n if (allUpper) return word\n if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1)\n return word.charAt(0).toUpperCase() + word.slice(1)\n })\n .join('')\n .replace(/[^a-zA-Z0-9]/g, '')\n}\n\n/**\n * Splits `text` on `.` and applies `transformPart` to each segment.\n * The last segment receives `isLast = true`, all earlier segments receive `false`.\n * Segments are joined with `/` to form a file path.\n *\n * Only splits on dots followed by a letter so that version numbers\n * embedded in operationIds (e.g. `v2025.0`) are kept intact.\n */\nfunction applyToFileParts(text: string, transformPart: (part: string, isLast: boolean) => string): string {\n const parts = text.split(/\\.(?=[a-zA-Z])/)\n return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join('/')\n}\n\n/**\n * Converts `text` to camelCase.\n * When `isFile` is `true`, dot-separated segments are each cased independently and joined with `/`.\n *\n * @example\n * camelCase('hello-world') // 'helloWorld'\n * camelCase('pet.petId', { isFile: true }) // 'pet/petId'\n */\nexport function camelCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => camelCase(part, isLast ? { prefix, suffix } : {}))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false)\n}\n\n/**\n * Converts `text` to PascalCase.\n * When `isFile` is `true`, the last dot-separated segment is PascalCased and earlier segments are camelCased.\n *\n * @example\n * pascalCase('hello-world') // 'HelloWorld'\n * pascalCase('pet.petId', { isFile: true }) // 'pet/PetId'\n */\nexport function pascalCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => (isLast ? pascalCase(part, { prefix, suffix }) : camelCase(part)))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true)\n}\n\n/**\n * Converts `text` to snake_case.\n *\n * @example\n * snakeCase('helloWorld') // 'hello_world'\n * snakeCase('Hello-World') // 'hello_world'\n */\nexport function snakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n const processed = `${prefix} ${text} ${suffix}`.trim()\n return processed\n .replace(/([a-z])([A-Z])/g, '$1_$2')\n .replace(/[\\s\\-.]+/g, '_')\n .replace(/[^a-zA-Z0-9_]/g, '')\n .toLowerCase()\n .split('_')\n .filter(Boolean)\n .join('_')\n}\n\n/**\n * Converts `text` to SCREAMING_SNAKE_CASE.\n *\n * @example\n * screamingSnakeCase('helloWorld') // 'HELLO_WORLD'\n */\nexport function screamingSnakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n return snakeCase(text, { prefix, suffix }).toUpperCase()\n}\n","/**\n * JavaScript and Java reserved words.\n * @link https://github.com/jonschlinkert/reserved/blob/master/index.js\n */\nconst reservedWords = new Set([\n 'abstract',\n 'arguments',\n 'boolean',\n 'break',\n 'byte',\n 'case',\n 'catch',\n 'char',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'double',\n 'else',\n 'enum',\n 'eval',\n 'export',\n 'extends',\n 'false',\n 'final',\n 'finally',\n 'float',\n 'for',\n 'function',\n 'goto',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'int',\n 'interface',\n 'let',\n 'long',\n 'native',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'short',\n 'static',\n 'super',\n 'switch',\n 'synchronized',\n 'this',\n 'throw',\n 'throws',\n 'transient',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'volatile',\n 'while',\n 'with',\n 'yield',\n 'Array',\n 'Date',\n 'hasOwnProperty',\n 'Infinity',\n 'isFinite',\n 'isNaN',\n 'isPrototypeOf',\n 'length',\n 'Math',\n 'name',\n 'NaN',\n 'Number',\n 'Object',\n 'prototype',\n 'String',\n 'toString',\n 'undefined',\n 'valueOf',\n] as const)\n\n/**\n * Prefixes `word` with `_` when it is a reserved JavaScript/Java identifier or starts with a digit.\n *\n * @example\n * ```ts\n * transformReservedWord('class') // '_class'\n * transformReservedWord('42foo') // '_42foo'\n * transformReservedWord('status') // 'status'\n * ```\n */\nexport function transformReservedWord(word: string): string {\n const firstChar = word.charCodeAt(0)\n if (word && (reservedWords.has(word as 'valueOf') || (firstChar >= 48 && firstChar <= 57))) {\n return `_${word}`\n }\n return word\n}\n\n/**\n * Returns `true` when `name` is a syntactically valid JavaScript variable name.\n *\n * @example\n * ```ts\n * isValidVarName('status') // true\n * isValidVarName('class') // false (reserved word)\n * isValidVarName('42foo') // false (starts with digit)\n * ```\n */\nexport function isValidVarName(name: string): boolean {\n try {\n new Function(`var ${name}`)\n } catch {\n return false\n }\n return true\n}\n","import { camelCase } from './casing.ts'\nimport { isValidVarName } from './reserved.ts'\n\nexport type URLObject = {\n /**\n * The resolved URL string (Express-style or template literal, depending on context).\n */\n url: string\n /**\n * Extracted path parameters as a key-value map, or `undefined` when the path has none.\n */\n params?: Record<string, string>\n}\n\ntype ObjectOptions = {\n /**\n * Controls whether the `url` is rendered as an Express path or a template literal.\n * @default 'path'\n */\n type?: 'path' | 'template'\n /**\n * Optional transform applied to each extracted parameter name.\n */\n replacer?: (pathParam: string) => string\n /**\n * When `true`, the result is serialized to a string expression instead of a plain object.\n */\n stringify?: boolean\n}\n\n/**\n * Supported identifier casing strategies for path parameters.\n */\ntype PathCasing = 'camelcase'\n\ntype Options = {\n /**\n * Casing strategy applied to path parameter names.\n * @default undefined (original identifier preserved)\n */\n casing?: PathCasing\n}\n\n/**\n * Parses and transforms an OpenAPI/Swagger path string into various URL formats.\n *\n * @example\n * const p = new URLPath('/pet/{petId}')\n * p.URL // '/pet/:petId'\n * p.template // '`/pet/${petId}`'\n */\nexport class URLPath {\n /**\n * The raw OpenAPI/Swagger path string, e.g. `/pet/{petId}`.\n */\n path: string\n\n #options: Options\n\n constructor(path: string, options: Options = {}) {\n this.path = path\n this.#options = options\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`.\n *\n * @example\n * ```ts\n * new URLPath('/pet/{petId}').URL // '/pet/:petId'\n * ```\n */\n get URL(): string {\n return this.toURLPath()\n }\n\n /** Returns `true` when `path` is a fully-qualified URL (e.g. starts with `https://`).\n *\n * @example\n * ```ts\n * new URLPath('https://petstore.swagger.io/v2/pet').isURL // true\n * new URLPath('/pet/{petId}').isURL // false\n * ```\n */\n get isURL(): boolean {\n try {\n return !!new URL(this.path).href\n } catch {\n return false\n }\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n *\n * @example\n * new URLPath('/pet/{petId}').template // '`/pet/${petId}`'\n * new URLPath('/account/monetary-accountID').template // '`/account/${monetaryAccountId}`'\n */\n get template(): string {\n return this.toTemplateString()\n }\n\n /** Returns the path and its extracted params as a structured `URLObject`, or as a stringified expression when `stringify` is set.\n *\n * @example\n * ```ts\n * new URLPath('/pet/{petId}').object\n * // { url: '/pet/:petId', params: { petId: 'petId' } }\n * ```\n */\n get object(): URLObject | string {\n return this.toObject()\n }\n\n /** Returns a map of path parameter names, or `undefined` when the path has no parameters.\n *\n * @example\n * ```ts\n * new URLPath('/pet/{petId}').params // { petId: 'petId' }\n * new URLPath('/pet').params // undefined\n * ```\n */\n get params(): Record<string, string> | undefined {\n return this.getParams()\n }\n\n #transformParam(raw: string): string {\n const param = isValidVarName(raw) ? raw : camelCase(raw)\n return this.#options.casing === 'camelcase' ? camelCase(param) : param\n }\n\n /**\n * Iterates over every `{param}` token in `path`, calling `fn` with the raw token and transformed name.\n */\n #eachParam(fn: (raw: string, param: string) => void): void {\n for (const match of this.path.matchAll(/\\{([^}]+)\\}/g)) {\n const raw = match[1]!\n fn(raw, this.#transformParam(raw))\n }\n }\n\n toObject({ type = 'path', replacer, stringify }: ObjectOptions = {}): URLObject | string {\n const object = {\n url: type === 'path' ? this.toURLPath() : this.toTemplateString({ replacer }),\n params: this.getParams(),\n }\n\n if (stringify) {\n if (type === 'template') {\n return JSON.stringify(object).replaceAll(\"'\", '').replaceAll(`\"`, '')\n }\n\n if (object.params) {\n return `{ url: '${object.url}', params: ${JSON.stringify(object.params).replaceAll(\"'\", '').replaceAll(`\"`, '')} }`\n }\n\n return `{ url: '${object.url}' }`\n }\n\n return object\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n * An optional `replacer` can transform each extracted parameter name before interpolation.\n *\n * @example\n * new URLPath('/pet/{petId}').toTemplateString() // '`/pet/${petId}`'\n */\n toTemplateString({ prefix = '', replacer }: { prefix?: string; replacer?: (pathParam: string) => string } = {}): string {\n const parts = this.path.split(/\\{([^}]+)\\}/)\n const result = parts\n .map((part, i) => {\n if (i % 2 === 0) return part\n const param = this.#transformParam(part)\n return `\\${${replacer ? replacer(param) : param}}`\n })\n .join('')\n\n return `\\`${prefix}${result}\\``\n }\n\n /**\n * Extracts all `{param}` segments from the path and returns them as a key-value map.\n * An optional `replacer` transforms each parameter name in both key and value positions.\n * Returns `undefined` when no path parameters are found.\n *\n * @example\n * ```ts\n * new URLPath('/pet/{petId}/tag/{tagId}').getParams()\n * // { petId: 'petId', tagId: 'tagId' }\n * ```\n */\n getParams(replacer?: (pathParam: string) => string): Record<string, string> | undefined {\n const params: Record<string, string> = {}\n\n this.#eachParam((_raw, param) => {\n const key = replacer ? replacer(param) : param\n params[key] = key\n })\n\n return Object.keys(params).length > 0 ? params : undefined\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax.\n *\n * @example\n * ```ts\n * new URLPath('/pet/{petId}').toURLPath() // '/pet/:petId'\n * ```\n */\n toURLPath(): string {\n return this.path.replace(/\\{([^}]+)\\}/g, ':$1')\n }\n}\n","import { URLPath } from '@internals/utils'\nimport { type HttpMethod, isAllOptional, isOptional } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginCypress } from '../types.ts'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n typeSchemas: OperationSchemas\n url: string\n baseURL: string | undefined\n dataReturnType: PluginCypress['resolvedOptions']['dataReturnType']\n paramsCasing: PluginCypress['resolvedOptions']['paramsCasing']\n paramsType: PluginCypress['resolvedOptions']['paramsType']\n pathParamsType: PluginCypress['resolvedOptions']['pathParamsType']\n method: HttpMethod\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginCypress['resolvedOptions']['paramsCasing']\n paramsType: PluginCypress['resolvedOptions']['paramsType']\n pathParamsType: PluginCypress['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) {\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing })\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...pathParams,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n },\n },\n options: {\n type: 'Partial<Cypress.RequestOptions>',\n default: '{}',\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n default: isAllOptional(typeSchemas.pathParams?.schema) ? '{}' : undefined,\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n options: {\n type: 'Partial<Cypress.RequestOptions>',\n default: '{}',\n },\n })\n}\n\nexport function Request({ baseURL = '', name, dataReturnType, typeSchemas, url, method, paramsType, paramsCasing, pathParamsType }: Props): FabricReactNode {\n const path = new URLPath(url, { casing: paramsCasing })\n\n const params = getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas })\n\n const returnType =\n dataReturnType === 'data' ? `Cypress.Chainable<${typeSchemas.response.name}>` : `Cypress.Chainable<Cypress.Response<${typeSchemas.response.name}>>`\n\n // Build the URL template string - this will convert /pets/:petId to /pets/${petId}\n const urlTemplate = path.toTemplateString({ prefix: baseURL })\n\n // Build request options object\n const requestOptions: string[] = [`method: '${method}'`, `url: ${urlTemplate}`]\n\n // Add query params if they exist\n if (typeSchemas.queryParams?.name) {\n requestOptions.push('qs: params')\n }\n\n // Add headers if they exist\n if (typeSchemas.headerParams?.name) {\n requestOptions.push('headers')\n }\n\n // Add body if request schema exists\n if (typeSchemas.request?.name) {\n requestOptions.push('body: data')\n }\n\n // Spread additional Cypress options\n requestOptions.push('...options')\n\n return (\n <File.Source name={name} isIndexable isExportable>\n <Function name={name} export params={params.toConstructor()} returnType={returnType}>\n {dataReturnType === 'data'\n ? `return cy.request<${typeSchemas.response.name}>({\n ${requestOptions.join(',\\n ')}\n}).then((res) => res.body)`\n : `return cy.request<${typeSchemas.response.name}>({\n ${requestOptions.join(',\\n ')}\n})`}\n </Function>\n </File.Source>\n )\n}\n\nRequest.getParams = getParams\n"],"mappings":";;;;;;;;;;;;;AAsBA,SAAS,gBAAgB,MAAc,QAAyB;AAS9D,QARmB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