@kubb/plugin-cypress 4.29.1 → 4.31.1
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.
- package/package.json +8 -7
- package/dist/types-B9vKVNbE.d.ts +0 -86
- package/src/generators/__snapshots__/createPet.ts +0 -15
- package/src/generators/__snapshots__/deletePet.ts +0 -19
- package/src/generators/__snapshots__/getPets.ts +0 -15
- package/src/generators/__snapshots__/getPetsWithTemplateString.ts +0 -15
- package/src/generators/__snapshots__/showPetById.ts +0 -14
- package/src/generators/__snapshots__/updatePet.ts +0 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-cypress",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.31.1",
|
|
4
4
|
"description": "Cypress test generator plugin for Kubb, creating end-to-end tests from OpenAPI specifications for automated API testing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cypress",
|
|
@@ -65,7 +65,8 @@
|
|
|
65
65
|
"src",
|
|
66
66
|
"dist",
|
|
67
67
|
"!/**/**.test.**",
|
|
68
|
-
"!/**/__tests__/**"
|
|
68
|
+
"!/**/__tests__/**",
|
|
69
|
+
"!/**/__snapshots__/**"
|
|
69
70
|
],
|
|
70
71
|
"size-limit": [
|
|
71
72
|
{
|
|
@@ -75,11 +76,11 @@
|
|
|
75
76
|
}
|
|
76
77
|
],
|
|
77
78
|
"dependencies": {
|
|
78
|
-
"@kubb/react-fabric": "0.13.
|
|
79
|
-
"@kubb/core": "4.
|
|
80
|
-
"@kubb/oas": "4.
|
|
81
|
-
"@kubb/plugin-oas": "4.
|
|
82
|
-
"@kubb/plugin-ts": "4.
|
|
79
|
+
"@kubb/react-fabric": "0.13.3",
|
|
80
|
+
"@kubb/core": "4.31.1",
|
|
81
|
+
"@kubb/oas": "4.31.1",
|
|
82
|
+
"@kubb/plugin-oas": "4.31.1",
|
|
83
|
+
"@kubb/plugin-ts": "4.31.1"
|
|
83
84
|
},
|
|
84
85
|
"engines": {
|
|
85
86
|
"node": ">=20"
|
package/dist/types-B9vKVNbE.d.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Oas, contentType } from "@kubb/oas";
|
|
2
|
-
import { Exclude, Include, Override, ResolvePathOptions } from "@kubb/plugin-oas";
|
|
3
|
-
import { Group, Output, PluginFactoryOptions, ResolveNameParams } from "@kubb/core";
|
|
4
|
-
import { Generator } from "@kubb/plugin-oas/generators";
|
|
5
|
-
|
|
6
|
-
//#region \0rolldown/runtime.js
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/types.d.ts
|
|
9
|
-
type Options = {
|
|
10
|
-
/**
|
|
11
|
-
* Specify the export location for the files and define the behavior of the output
|
|
12
|
-
* @default { path: 'cypress', barrelType: 'named' }
|
|
13
|
-
*/
|
|
14
|
-
output?: Output<Oas>;
|
|
15
|
-
/**
|
|
16
|
-
* Define which contentType should be used.
|
|
17
|
-
* By default, the first JSON valid mediaType is used
|
|
18
|
-
*/
|
|
19
|
-
contentType?: contentType;
|
|
20
|
-
/**
|
|
21
|
-
* Return type when calling cy.request.
|
|
22
|
-
* - 'data' returns ResponseConfig[data].
|
|
23
|
-
* - 'full' returns ResponseConfig.
|
|
24
|
-
* @default 'data'
|
|
25
|
-
*/
|
|
26
|
-
dataReturnType?: 'data' | 'full';
|
|
27
|
-
/**
|
|
28
|
-
* How to style your params, by default no casing is applied
|
|
29
|
-
* - 'camelcase' uses camelcase for the params names
|
|
30
|
-
*/
|
|
31
|
-
paramsCasing?: 'camelcase';
|
|
32
|
-
/**
|
|
33
|
-
* How to pass your params.
|
|
34
|
-
* - 'object' returns the params and pathParams as an object.
|
|
35
|
-
* - 'inline' returns the params as comma separated params.
|
|
36
|
-
* @default 'inline'
|
|
37
|
-
*/
|
|
38
|
-
paramsType?: 'object' | 'inline';
|
|
39
|
-
/**
|
|
40
|
-
* How to pass your pathParams.
|
|
41
|
-
* - 'object' returns the pathParams as an object.
|
|
42
|
-
* - 'inline' returns the pathParams as comma separated params.
|
|
43
|
-
* @default 'inline'
|
|
44
|
-
*/
|
|
45
|
-
pathParamsType?: 'object' | 'inline';
|
|
46
|
-
baseURL?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Group the Cypress requests based on the provided name.
|
|
49
|
-
*/
|
|
50
|
-
group?: Group;
|
|
51
|
-
/**
|
|
52
|
-
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
53
|
-
*/
|
|
54
|
-
exclude?: Array<Exclude>;
|
|
55
|
-
/**
|
|
56
|
-
* Array containing include parameters to include tags/operations/methods/paths.
|
|
57
|
-
*/
|
|
58
|
-
include?: Array<Include>;
|
|
59
|
-
/**
|
|
60
|
-
* Array containing override parameters to override `options` based on tags/operations/methods/paths.
|
|
61
|
-
*/
|
|
62
|
-
override?: Array<Override<ResolvedOptions>>;
|
|
63
|
-
transformers?: {
|
|
64
|
-
/**
|
|
65
|
-
* Customize the names based on the type that is provided by the plugin.
|
|
66
|
-
*/
|
|
67
|
-
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Define some generators next to the Cypress generators.
|
|
71
|
-
*/
|
|
72
|
-
generators?: Array<Generator<PluginCypress>>;
|
|
73
|
-
};
|
|
74
|
-
type ResolvedOptions = {
|
|
75
|
-
output: Output<Oas>;
|
|
76
|
-
group: Options['group'];
|
|
77
|
-
baseURL: Options['baseURL'] | undefined;
|
|
78
|
-
dataReturnType: NonNullable<Options['dataReturnType']>;
|
|
79
|
-
pathParamsType: NonNullable<Options['pathParamsType']>;
|
|
80
|
-
paramsType: NonNullable<Options['paramsType']>;
|
|
81
|
-
paramsCasing: Options['paramsCasing'];
|
|
82
|
-
};
|
|
83
|
-
type PluginCypress = PluginFactoryOptions<'plugin-cypress', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
84
|
-
//#endregion
|
|
85
|
-
export { PluginCypress as n, __name as r, Options as t };
|
|
86
|
-
//# sourceMappingURL=types-B9vKVNbE.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export function createPets(data: CreatePetsMutationRequest, options: Partial<Cypress.RequestOptions> = {}): Cypress.Chainable<CreatePetsMutationResponse> {
|
|
7
|
-
return cy
|
|
8
|
-
.request<CreatePetsMutationResponse>({
|
|
9
|
-
method: 'post',
|
|
10
|
-
url: `/pets`,
|
|
11
|
-
body: data,
|
|
12
|
-
...options,
|
|
13
|
-
})
|
|
14
|
-
.then((res) => res.body)
|
|
15
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export function deletePet(
|
|
7
|
-
petId: DeletePetPathParams['petId'],
|
|
8
|
-
headers?: DeletePetHeaderParams,
|
|
9
|
-
options: Partial<Cypress.RequestOptions> = {},
|
|
10
|
-
): Cypress.Chainable<DeletePetMutationResponse> {
|
|
11
|
-
return cy
|
|
12
|
-
.request<DeletePetMutationResponse>({
|
|
13
|
-
method: 'delete',
|
|
14
|
-
url: `/pets/${petId}`,
|
|
15
|
-
headers,
|
|
16
|
-
...options,
|
|
17
|
-
})
|
|
18
|
-
.then((res) => res.body)
|
|
19
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export function listPets(params?: ListPetsQueryParams, options: Partial<Cypress.RequestOptions> = {}): Cypress.Chainable<ListPetsQueryResponse> {
|
|
7
|
-
return cy
|
|
8
|
-
.request<ListPetsQueryResponse>({
|
|
9
|
-
method: 'get',
|
|
10
|
-
url: `/pets`,
|
|
11
|
-
qs: params,
|
|
12
|
-
...options,
|
|
13
|
-
})
|
|
14
|
-
.then((res) => res.body)
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export function listPets(params?: ListPetsQueryParams, options: Partial<Cypress.RequestOptions> = {}): Cypress.Chainable<ListPetsQueryResponse> {
|
|
7
|
-
return cy
|
|
8
|
-
.request<ListPetsQueryResponse>({
|
|
9
|
-
method: 'get',
|
|
10
|
-
url: `${123456}/pets`,
|
|
11
|
-
qs: params,
|
|
12
|
-
...options,
|
|
13
|
-
})
|
|
14
|
-
.then((res) => res.body)
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export function showPetById(petId: ShowPetByIdPathParams['petId'], options: Partial<Cypress.RequestOptions> = {}): Cypress.Chainable<ShowPetByIdQueryResponse> {
|
|
7
|
-
return cy
|
|
8
|
-
.request<ShowPetByIdQueryResponse>({
|
|
9
|
-
method: 'get',
|
|
10
|
-
url: `/pets/${petId}`,
|
|
11
|
-
...options,
|
|
12
|
-
})
|
|
13
|
-
.then((res) => res.body)
|
|
14
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export function updatePet(
|
|
7
|
-
petId: UpdatePetPathParams['petId'],
|
|
8
|
-
data: UpdatePetMutationRequest,
|
|
9
|
-
options: Partial<Cypress.RequestOptions> = {},
|
|
10
|
-
): Cypress.Chainable<UpdatePetMutationResponse> {
|
|
11
|
-
return cy
|
|
12
|
-
.request<UpdatePetMutationResponse>({
|
|
13
|
-
method: 'put',
|
|
14
|
-
url: `/pets/${petId}`,
|
|
15
|
-
body: data,
|
|
16
|
-
...options,
|
|
17
|
-
})
|
|
18
|
-
.then((res) => res.body)
|
|
19
|
-
}
|