1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-10-30 22:33:11 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

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:
sunnylqm
2025-02-19 22:53:24 +08:00
parent 04b5d12daa
commit 4e51f291ca
7 changed files with 71 additions and 35 deletions

View File

@@ -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';

View File

@@ -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 '';
}