Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-cn committed Jul 5, 2024
1 parent 53d4087 commit 0b1fffd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './adapter';
export * from './message';
export * as axios from 'axios';
export { default as axios } from 'axios';
export * as yaml from 'yaml';
export * from './types';
export * from './utils';
Expand Down
5 changes: 2 additions & 3 deletions zhin/src/plugins/zhinManager.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { App, Dict, Plugin, remove, segment, WORK_DIR } from '@zhinjs/core';
import { App, Dict, Plugin, remove, segment, WORK_DIR, axios } from '@zhinjs/core';
import { exec, execSync } from 'child_process';
import * as fs from 'fs';
import path from 'path';
import { version } from '../constants';
import { axios } from '../../lib';
const downloadGit = (url: string, savePath: string = '.') => {
return new Promise<string>((resolve, reject) => {
exec(
Expand Down Expand Up @@ -103,7 +102,7 @@ zhinManager
const afterVersion = await (async () => {
const response = await axios.get('https://registry.npmjs.org/zhin');
if (options.version === 'latest') return response.data['dist-tags'].latest;
return response.data['versions'][options.version];
return response.data['versions'][options.version!];
})();
if (!afterVersion) return `无效的版本号: ${options.version}`;
if (afterVersion === beforeVersion) return `zhin 已是最新版(${afterVersion})`;
Expand Down

0 comments on commit 0b1fffd

Please sign in to comment.