File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -2,21 +2,17 @@ import { Miniflare } from 'miniflare';
2
2
3
3
import { buildScriptFromManifest } from './build' ;
4
4
import { getMiniflareOptions } from './dev' ;
5
- import { withEnvironment } from './environments' ;
6
5
7
6
/**
8
7
* Check that an integration can build correctly without publishing it.
9
8
*/
10
9
export async function checkIntegrationBuild ( manifestSpecPath : string ) {
11
- // We use a special env "test" to make it easy to configure the integration for testing.
12
- return withEnvironment ( 'test' , async ( ) => {
13
- const { path : scriptPath } = await buildScriptFromManifest ( manifestSpecPath , {
14
- mode : 'development' ,
15
- } ) ;
10
+ const { path : scriptPath } = await buildScriptFromManifest ( manifestSpecPath , {
11
+ mode : 'development' ,
12
+ } ) ;
16
13
17
- const mf = new Miniflare ( getMiniflareOptions ( scriptPath ) ) ;
18
- await mf . ready ;
14
+ const mf = new Miniflare ( getMiniflareOptions ( scriptPath ) ) ;
15
+ await mf . ready ;
19
16
20
- await mf . dispose ( ) ;
21
- } ) ;
17
+ await mf . dispose ( ) ;
22
18
}
Original file line number Diff line number Diff line change @@ -145,9 +145,12 @@ program
145
145
. argument ( '[file]' , 'integration definition file' , DEFAULT_MANIFEST_FILE )
146
146
. description ( 'check the integration build' )
147
147
. action ( async ( filePath ) => {
148
- await checkIntegrationBuild (
149
- await resolveIntegrationManifestPath ( path . resolve ( process . cwd ( ) , filePath ) ) ,
150
- ) ;
148
+ // We use a special env "test" to make it easy to configure the integration for testing.
149
+ return withEnvironment ( 'test' , async ( ) => {
150
+ await checkIntegrationBuild (
151
+ await resolveIntegrationManifestPath ( path . resolve ( process . cwd ( ) , filePath ) ) ,
152
+ ) ;
153
+ } ) ;
151
154
} ) ;
152
155
153
156
const openAPIProgram = program . command ( 'openapi' ) . description ( 'manage OpenAPI specifications' ) ;
You can’t perform that action at this time.
0 commit comments