@@ -93,8 +93,14 @@ async function main() {
9393 // Check if user is logged in
9494 execSync ( 'npm whoami' , { cwd : mppCorePackageDir , stdio : 'pipe' } ) ;
9595
96- // Publish
97- execSync ( 'npm publish --access public' , { cwd : mppCorePackageDir , stdio : 'inherit' } ) ;
96+ // Determine if this is a prerelease version (contains -, like alpha, beta, rc)
97+ const isPrerelease = mppCoreVersion . includes ( '-' ) ;
98+ const publishCmd = isPrerelease
99+ ? 'npm publish --access public --tag next'
100+ : 'npm publish --access public' ;
101+
102+ console . log ( ' Publishing with command:' , publishCmd ) ;
103+ execSync ( publishCmd , { cwd : mppCorePackageDir , stdio : 'inherit' } ) ;
98104 console . log ( '✅ mpp-core published successfully\n' ) ;
99105
100106 // Wait a bit for npm registry to update
@@ -154,10 +160,17 @@ async function main() {
154160 }
155161
156162 try {
157- execSync ( 'npm publish --access public' , { cwd : rootDir , stdio : 'inherit' } ) ;
163+ // Determine if this is a prerelease version
164+ const isCliPrerelease = currentVersion . includes ( '-' ) ;
165+ const cliPublishCmd = isCliPrerelease
166+ ? 'npm publish --access public --tag next'
167+ : 'npm publish --access public' ;
168+
169+ console . log ( ' Publishing with command:' , cliPublishCmd ) ;
170+ execSync ( cliPublishCmd , { cwd : rootDir , stdio : 'inherit' } ) ;
158171 console . log ( '✅ @xiuper/cli published successfully\n' ) ;
159172 } catch ( error ) {
160- console . error ( '❌ @autodev /cli publish failed' ) ;
173+ console . error ( '❌ @xiuper /cli publish failed' ) ;
161174 console . log ( '🔄 Restoring package.json...' ) ;
162175 copyFileSync ( packageJsonBackupPath , packageJsonPath ) ;
163176 process . exit ( 1 ) ;
0 commit comments