File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @hey-api/openapi-ts ' : patch
3
+ ---
4
+
5
+ fix: export default pagination keywords
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ export const defineConfig = async (config: Configs): Promise<UserConfig> =>
101
101
typeof config === 'function' ? await config ( ) : config ;
102
102
103
103
export { defaultPlugins } from './initConfigs' ;
104
+ export { defaultPaginationKeywords } from './ir/pagination' ;
104
105
export type { IR } from './ir/types' ;
105
106
export type { OpenApi , OpenApiSchemaObject } from './openApi/types' ;
106
107
export { clientDefaultConfig } from './plugins/@hey-api/client-core/config' ;
Original file line number Diff line number Diff line change 1
1
import type { Config } from '../types/config' ;
2
2
import type { IR } from './types' ;
3
3
4
- export const DEFAULT_PAGINATION_KEYWORDS = [
4
+ export const defaultPaginationKeywords = [
5
5
'after' ,
6
6
'before' ,
7
7
'cursor' ,
@@ -11,10 +11,10 @@ export const DEFAULT_PAGINATION_KEYWORDS = [
11
11
] as const ;
12
12
13
13
export function getPaginationKeywordsRegExp ( {
14
- keywords = DEFAULT_PAGINATION_KEYWORDS ,
14
+ keywords = defaultPaginationKeywords ,
15
15
} : Config [ 'input' ] [ 'pagination' ] = { } ) : RegExp {
16
16
if ( ! keywords . length ) {
17
- keywords = DEFAULT_PAGINATION_KEYWORDS ;
17
+ keywords = defaultPaginationKeywords ;
18
18
}
19
19
const pattern = `^(${ keywords . join ( '|' ) } )$` ;
20
20
return new RegExp ( pattern ) ;
You can’t perform that action at this time.
0 commit comments