mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-10-30 22:33:11 +08:00
Refactor project configuration and dependencies
- Move IS_CRESC logic to constants module - Update package.json with new type definitions - Simplify global variable usage - Update bun.lock with latest package versions - Improve type safety and configuration management
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
export const credentialFile = global.IS_CRESC ? '.cresc.token' : '.update';
|
||||
export const updateJson = global.IS_CRESC ? 'cresc.config.json' : 'update.json';
|
||||
export const tempDir = global.IS_CRESC ? '.cresc.temp' : '.pushy';
|
||||
export const pricingPageUrl = global.IS_CRESC
|
||||
import path from 'node:path';
|
||||
|
||||
const scriptName: 'cresc' | 'pushy' = path.basename(process.argv[1]) as
|
||||
| 'cresc'
|
||||
| 'pushy';
|
||||
export const IS_CRESC = scriptName === 'cresc';
|
||||
|
||||
export const credentialFile = IS_CRESC ? '.cresc.token' : '.update';
|
||||
export const updateJson = IS_CRESC ? 'cresc.config.json' : 'update.json';
|
||||
export const tempDir = IS_CRESC ? '.cresc.temp' : '.pushy';
|
||||
export const pricingPageUrl = IS_CRESC
|
||||
? 'https://cresc.dev/pricing'
|
||||
: 'https://pushy.reactnative.cn/pricing.html';
|
||||
|
||||
@@ -11,7 +11,7 @@ import { checkPlugins } from './check-plugin';
|
||||
import { read } from 'read';
|
||||
import { tempDir } from './constants';
|
||||
|
||||
export async function question(query: string, password: boolean) {
|
||||
export async function question(query: string, password?: boolean) {
|
||||
if (NO_INTERACTIVE) {
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user