File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
packages/cloudflare/src/cli/build Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
20
20
createWranglerConfigIfNotExistent ,
21
21
ensureCloudflareConfig ,
22
22
} from "./utils/index.js" ;
23
+ import { getVersion } from "./utils/version.js" ;
23
24
24
25
/**
25
26
* Builds the application in a format that can be passed to workerd
@@ -56,7 +57,9 @@ export async function build(projectOpts: ProjectOptions): Promise<void> {
56
57
logger . info ( `App directory: ${ options . appPath } ` ) ;
57
58
buildHelper . printNextjsVersion ( options ) ;
58
59
ensureNextjsVersionSupported ( options ) ;
59
- buildHelper . printOpenNextVersion ( options ) ;
60
+ const { aws, cloudflare } = getVersion ( ) ;
61
+ logger . info ( `@opennextjs/cloudflare version: ${ cloudflare } ` ) ;
62
+ logger . info ( `@opennextjs/aws version: ${ aws } ` ) ;
60
63
61
64
if ( projectOpts . skipNextBuild ) {
62
65
logger . warn ( "Skipping Next.js build" ) ;
Original file line number Diff line number Diff line change
1
+ import { createRequire } from "node:module" ;
2
+ import { join } from "node:path" ;
3
+ import { fileURLToPath } from "node:url" ;
4
+
5
+ export function getVersion ( ) {
6
+ const require = createRequire ( import . meta. url ) ;
7
+ const __dirname = fileURLToPath ( new URL ( "." , import . meta. url ) ) ;
8
+ const pkgJson = require ( join ( __dirname , "../../../../package.json" ) ) ;
9
+ return {
10
+ cloudflare : pkgJson . version ,
11
+ aws : pkgJson . dependencies [ "@opennextjs/aws" ] ,
12
+ } ;
13
+ }
You can’t perform that action at this time.
0 commit comments