File tree Expand file tree Collapse file tree 8 files changed +50
-2
lines changed Expand file tree Collapse file tree 8 files changed +50
-2
lines changed Original file line number Diff line number Diff line change 52
52
"default" : " ./dist/index.cjs"
53
53
}
54
54
},
55
+ "./internal" : {
56
+ "import" : {
57
+ "types" : " ./dist/internal.d.ts" ,
58
+ "default" : " ./dist/internal.js"
59
+ },
60
+ "require" : {
61
+ "types" : " ./dist/internal.d.cts" ,
62
+ "default" : " ./dist/internal.cjs"
63
+ }
64
+ },
55
65
"./package.json" : " ./package.json"
56
66
},
57
67
"bin" : {
64
74
],
65
75
"scripts" : {
66
76
"build" : " tsup && pnpm check-exports" ,
67
- "check-exports" : " attw --pack ." ,
77
+ "check-exports" : " attw --pack . --profile node16 " ,
68
78
"dev" : " tsup --watch" ,
69
79
"handlebars" : " node src/legacy/handlebars/handlebars.cjs" ,
70
80
"prepublishOnly" : " pnpm build" ,
Original file line number Diff line number Diff line change
1
+ import { describe , expect , it } from 'vitest' ;
2
+
3
+ describe ( 'main entry index' , ( ) => {
4
+ describe ( 'createClient' , ( ) => {
5
+ it ( 'should be exported' , async ( ) => {
6
+ const { createClient } = await import ( '../index' ) ;
7
+ expect ( createClient ) . toBeDefined ( ) ;
8
+ } ) ;
9
+ } ) ;
10
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { describe , expect , it } from 'vitest' ;
2
+
3
+ describe ( 'internal entry index' , ( ) => {
4
+ it ( 'getSpec should be exported' , async ( ) => {
5
+ const { getSpec } = await import ( '../internal' ) ;
6
+ expect ( getSpec ) . toBeDefined ( ) ;
7
+ } ) ;
8
+
9
+ it ( 'initConfigs should be exported' , async ( ) => {
10
+ const { initConfigs } = await import ( '../internal' ) ;
11
+ expect ( initConfigs ) . toBeDefined ( ) ;
12
+ } ) ;
13
+
14
+ it ( 'parseOpenApiSpec should be exported' , async ( ) => {
15
+ const { parseOpenApiSpec } = await import ( '../internal' ) ;
16
+ expect ( parseOpenApiSpec ) . toBeDefined ( ) ;
17
+ } ) ;
18
+ } ) ;
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ interface SpecError {
21
21
response : Response ;
22
22
}
23
23
24
+ /**
25
+ * @internal
26
+ */
24
27
export const getSpec = async ( {
25
28
fetchOptions,
26
29
inputPath,
Original file line number Diff line number Diff line change @@ -253,6 +253,9 @@ const getWatch = (
253
253
return watch ;
254
254
} ;
255
255
256
+ /**
257
+ * @internal
258
+ */
256
259
export const initConfigs = async (
257
260
userConfig : UserConfig | undefined ,
258
261
) : Promise < Config [ ] > => {
Original file line number Diff line number Diff line change
1
+ export { getSpec } from './getSpec' ;
2
+ export { initConfigs } from './initConfigs' ;
3
+ export { parseOpenApiSpec } from './openApi' ;
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ export function parseLegacy({
57
57
}
58
58
59
59
/**
60
+ * @internal
60
61
* Parse the resolved OpenAPI specification. This will populate and return
61
62
* `context` with intermediate representation obtained from the parsed spec.
62
63
*/
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default defineConfig((options) => ({
14
14
} ,
15
15
clean : true ,
16
16
dts : true ,
17
- entry : [ 'src/index.ts' ] ,
17
+ entry : [ 'src/index.ts' , 'src/internal.ts' ] ,
18
18
format : [ 'cjs' , 'esm' ] ,
19
19
minify : ! options . watch ,
20
20
shims : false ,
You can’t perform that action at this time.
0 commit comments